import request from '@/service/index.js'

export const addZoneItem = (categoryId, status) => {
  return request.post(
    `/zone`,
    {},
    {
      params: {
        categoryId,
        status,
      },
    }
  )
}

export const queryZoneList = (keyword, page, pageSize) => {
  return request.get('/zone', {
    params: {
      keyword,
      page,
      pageSize,
    },
  })
}

export const deleteZoneItem = (categoryId) => {
  return request.delete(`/zone`, {
    params: {
      categoryId,
    },
  })
}

export const updateZoneItem = (categoryId, status) => {
  return request.put(
    `/zone`,
    {},
    {
      params: {
        categoryId,
        status,
      },
    }
  )
}
